package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.Question;
import cn.wolfcode.luowowo.article.query.QuestionQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface QuestionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Question record);

    Question selectByPrimaryKey(Long id);

    List<Question> selectAll();

    int updateByPrimaryKey(Question record);

    List<Question> query(QuestionQuery qo);

    int queryAttention(@Param("userId") Long userId, @Param("questionId") Long questionId);

    void removeAttention(@Param("questionId") Long questionId, @Param("userId") Long userId);

    void addAttention(@Param("questionId") Long questionId, @Param("userId") Long userId);

    void addviewnum(@Param("questionId") Long questionId, @Param("num") int num);

    void addreplynum(@Param("questionId") Long questionId, @Param("num") int num);

    void addthumbupnum(@Param("questionId") Long questionId, @Param("num") int num);
}